<?php 

/**
 * Joomla! 1.5 component arts_curriculum
 * @package    arts_curriculum
 * @subpackage
 * @author     Chris Borkowski {@link http://www.guggenheim.org}
 * @author     Created on 31-August-2009
 * @author    Modified on 16-July-2010
 */

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' ); 

function searchMessage(){
$search =& JFactory::getURI();
$u =& JFactory::getURI();
$message = $search->getVar('search', 'There are no items to be displayed', 'post','string');
$message = str_replace("-", " ", $message);

if ($message =='exhibitions') {
$message = "Exhibiitons";
} 
return $message;
}

?>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>

<div id="ac_sort_page_box">

     <?php if (searchMessage() == 'Note') :?>
    	<h4>Note to Teachers</h4>
    	<div id="ac_note"><?php echo $this->note[0]->main_body ;?></div>
   
   <?php else :?>
  <div id="ac_sort_page_title">
	<span id="ac_sort_message"><h4><?php  echo searchMessage(); ?> </h4></span>
   </div>
   <?php endif ;?>
   
<?php if (searchMessage() == "Artists") :?>
	
		<div id="artist_sort">
		<?php Arts_curriculumFrontHelper::cleansort($this->items); ?>
		</div>      
    
<?php elseif (searchMessage() == 'Exhibitions') :?>
    
  <?php foreach ($this->items as $item) : ?>
	<div class="row-with-pic row-with-pic-small">
			<!-- override main style on width -->
			<div class="row-picture" style="width:120px;">
			<?php echo $item->catThumbnail ;?>
			<p class="row-caption row-caption-small"><!--null--></p>
			</div>
			<!-- override main style on margin -->
			<div class="row-text" style="margin-left:130px;">
			<p><span class="ac_sort_cat_link_ex"><?php echo str_replace("ac_sort_cat_link", "ac_sort_cat_link_alt ", $item->catlink); ?></span><br>
			<?php echo $item->vBLURB;?></p>
			</div>
	</div>
     
  <?php endforeach; ?>

     <?php elseif (searchMessage() != '' && searchMessage() != 'Note') :?>
   
		<div id="ac_sort_lesson_box">
			<?php Arts_curriculumFrontHelper::cleansort2(& $this->items); ?>
		
		</div>
    
 

<?php endif ;?>


</div>
  </tr>
</table>
<from>
<input type="hidden" name="option" value="<?php echo $option;?>" />
<input type="hidden" name="sortby" value="" />
</form>
